package com.zengdada.authority.service.impl;

import com.zengdada.authority.model.DynamicTableToolbar;
import com.zengdada.authority.service.DynamicTableToolbarService;
import com.zengdada.authority.service.EnhanceBaseService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.weekend.WeekendSqls;

import java.util.List;

/**
 * @Auther: 12614
 * @Contact: 1261438511@qq.com
 * @Date: 2019-04-07 21:45
 * @Description:
 */
@Service
public class DynamicTableToolbarServiceImpl extends EnhanceBaseService<DynamicTableToolbar> implements DynamicTableToolbarService {
    @Override
    public List<DynamicTableToolbar> selectByTableId(String tableId) {
        return mapper.selectByExample(new Example.Builder(DynamicTableToolbar.class).where(WeekendSqls.<DynamicTableToolbar>custom().andEqualTo(DynamicTableToolbar::getTableId, tableId)).build());
    }
}
